package org.HisCanvas.ChrisRiffle.JFlightLog.swingUi.summaryPanel;

import java.awt.Dimension;



/**
 * LogBookSummaryPanelController
 * 
 * @author rif 
 */
public class LogBookSummaryPanelController {
	
	
	private static LogBookSummaryPanelController INSTANCE; 
	
	private LogBookSummaryPanel summaryPanel;
	
	private static final Dimension SUMMARY_PANEL_SIZE = new Dimension(250,200);
	
	
	
	/**
	 * singleton enforcement
	 */
	private LogBookSummaryPanelController() {
				
	}
	
	/**
	 * singleton
	 * 
	 * @return
	 * 		singleton
	 */
	public static LogBookSummaryPanelController instance(){
		
		if(INSTANCE == null){
			
			INSTANCE = new LogBookSummaryPanelController();
		}
		return INSTANCE;		
	}
	
	
	/**
	 * getSummaryPanel
	 * 
	 * @return
	 */
	public LogBookSummaryPanel getSummaryPanel(){;
	
		if(summaryPanel == null){
			
			summaryPanel = new LogBookSummaryPanel();
			summaryPanel.setPreferredSize(SUMMARY_PANEL_SIZE);			
		}
		return summaryPanel;		
	}

}
